package com.example.express.service.impl;

import com.example.express.dao.BaseAdminDao;
import com.example.express.dao.impl.AdminDaoImpl;
import com.example.express.service.BaseAdminService;

import java.util.Date;

public class AdminServiceImpl implements BaseAdminService {

    private BaseAdminDao dao = new AdminDaoImpl();
    /**
     * 更新登录时间和ip
     *
     * @param username
     * @param date
     * @param ip
     */
    @Override
    public void updateLoginTime(String username, Date date, String ip) {
        dao.updateLoginTime(username,date,ip);
    }

    /**
     * 管理员账号密码登录
     *
     * @param username
     * @param password
     * @return 返回true表示登录成功
     */
    @Override
    public boolean login(String username, String password) {
        return dao.login(username,password);
    }
}
